home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'DBLookup.pas' rev: 3.00
-
- #ifndef DBLookupHPP
- #define DBLookupHPP
- #include <DBCtrls.hpp>
- #include <Grids.hpp>
- #include <DBTables.hpp>
- #include <DBGrids.hpp>
- #include <Buttons.hpp>
- #include <Menus.hpp>
- #include <Graphics.hpp>
- #include <Forms.hpp>
- #include <SysUtils.hpp>
- #include <Messages.hpp>
- #include <Controls.hpp>
- #include <Db.hpp>
- #include <StdCtrls.hpp>
- #include <Classes.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Dblookup
- {
- //-- type declarations -------------------------------------------------------
- enum TDBLookupComboStyle { csDropDown, csDropDownList };
-
- enum TDBLookupListOption { loColLines, loRowLines, loTitles };
-
- typedef Set<TDBLookupListOption, loColLines, loTitles> TDBLookupListOptions;
-
- class DELPHICLASS TDBLookupCombo;
- class DELPHICLASS TPopupGrid;
- class DELPHICLASS TDBLookupList;
- class PASCALIMPLEMENTATION TDBLookupList : public Dbgrids::TCustomDBGrid
- {
- typedef Dbgrids::TCustomDBGrid inherited;
-
- private:
- Dbctrls::TFieldDataLink* FFieldLink;
- System::AnsiString FLookupDisplay;
- System::AnsiString FLookupField;
- Db::TField* FDisplayFld;
- Db::TField* FValueFld;
- System::AnsiString FValue;
- System::AnsiString FDisplayValue;
- int FHiliteRow;
- TDBLookupListOptions FOptions;
- int FTitleOffset;
- bool FFoundValue;
- bool FInCellSelect;
- Classes::TNotifyEvent FOnListClick;
- System::AnsiString __fastcall GetDataField(void);
- HIDESBASE Db::TDataSource* __fastcall GetDataSource(void);
- Db::TDataSource* __fastcall GetLookupSource(void);
- bool __fastcall GetReadOnly(void);
- void __fastcall FieldLinkActive(System::TObject* Sender);
- void __fastcall DataChange(System::TObject* Sender);
- void __fastcall SetDataField(const System::AnsiString Value);
- HIDESBASE void __fastcall SetDataSource(Db::TDataSource* Value);
- void __fastcall SetLookupSource(Db::TDataSource* Value);
- void __fastcall SetLookupDisplay(const System::AnsiString Value);
- void __fastcall SetLookupField(const System::AnsiString Value);
- void __fastcall SetValue(const System::AnsiString Value);
- void __fastcall SetDisplayValue(const System::AnsiString Value);
- void __fastcall SetReadOnly(bool Value);
- HIDESBASE void __fastcall SetOptions(TDBLookupListOptions Value);
- HIDESBASE void __fastcall UpdateData(System::TObject* Sender);
- void __fastcall NewLayout(void);
- void __fastcall DoLookup(void);
- HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
- HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
-
- protected:
- virtual bool __fastcall HighlightCell(int DataCol, int DataRow, const System::AnsiString Value, Grids::TGridDrawState
- AState);
- DYNAMIC bool __fastcall CanGridAcceptKey(Word Key, Classes::TShiftState Shift);
- virtual void __fastcall DefineFieldMap(void);
- virtual void __fastcall SetColumnAttributes(void);
- DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
- int Y);
- DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
- DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int
- Y);
- virtual bool __fastcall CanEdit(void);
- void __fastcall InitFields(bool ShowError);
- virtual void __fastcall CreateWnd(void);
- DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
- DYNAMIC void __fastcall KeyPress(char &Key);
- virtual void __fastcall LinkActive(bool Value);
- virtual void __fastcall Paint(void);
- virtual void __fastcall Scroll(int Distance);
- DYNAMIC void __fastcall ListClick(void);
- virtual void __fastcall Loaded(void);
- virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
- );
-
- public:
- __fastcall virtual TDBLookupList(Classes::TComponent* AOwner);
- __fastcall virtual ~TDBLookupList(void);
- __property System::AnsiString Value = {read=FValue, write=SetValue};
- __property System::AnsiString DisplayValue = {read=FDisplayValue, write=SetDisplayValue};
-
- __published:
- __property System::AnsiString DataField = {read=GetDataField, write=SetDataField};
- __property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
- __property Db::TDataSource* LookupSource = {read=GetLookupSource, write=SetLookupSource};
- __property System::AnsiString LookupDisplay = {read=FLookupDisplay, write=SetLookupDisplay};
- __property System::AnsiString LookupField = {read=FLookupField, write=SetLookupField};
- __property TDBLookupListOptions Options = {read=FOptions, write=SetOptions, default=0};
- __property Classes::TNotifyEvent OnClick = {read=FOnListClick, write=FOnListClick};
- __property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
- __property Align ;
- __property BorderStyle ;
- __property Color ;
- __property Ctl3D ;
- __property DragCursor ;
- __property DragMode ;
- __property Enabled ;
- __property Font ;
- __property ImeMode ;
- __property ImeName ;
- __property ParentColor ;
- __property ParentCtl3D ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property ShowHint ;
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property OnDblClick ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property OnEndDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property OnStartDrag ;
- public:
- /* TWinControl.CreateParented */ __fastcall TDBLookupList(HWND ParentWindow) : Dbgrids::TCustomDBGrid(
- ParentWindow) { }
-
- };
-
- class PASCALIMPLEMENTATION TPopupGrid : public Dblookup::TDBLookupList
- {
- typedef Dblookup::TDBLookupList inherited;
-
- private:
- TDBLookupCombo* FCombo;
- MESSAGE void __fastcall CMHintShow(Messages::TMessage &Message);
-
- protected:
- virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
- virtual void __fastcall CreateWnd(void);
- HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
- DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
- int Y);
- virtual bool __fastcall CanEdit(void);
- virtual void __fastcall LinkActive(bool Value);
-
- public:
- __property RowCount ;
- __fastcall virtual TPopupGrid(Classes::TComponent* AOwner);
- public:
- /* TDBLookupList.Destroy */ __fastcall virtual ~TPopupGrid(void) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TPopupGrid(HWND ParentWindow) : Dblookup::TDBLookupList(
- ParentWindow) { }
-
- };
-
- class PASCALIMPLEMENTATION TDBLookupCombo : public Stdctrls::TCustomEdit
- {
- typedef Stdctrls::TCustomEdit inherited;
-
- private:
- Controls::TControlCanvas* FCanvas;
- int FDropDownCount;
- int FDropDownWidth;
- int FTextMargin;
- Dbctrls::TFieldDataLink* FFieldLink;
- TPopupGrid* FGrid;
- Buttons::TSpeedButton* FButton;
- Controls::TWinControl* FBtnControl;
- TDBLookupComboStyle FStyle;
- Classes::TNotifyEvent FOnDropDown;
- System::AnsiString __fastcall GetDataField(void);
- Db::TDataSource* __fastcall GetDataSource(void);
- Db::TDataSource* __fastcall GetLookupSource(void);
- System::AnsiString __fastcall GetLookupDisplay(void);
- System::AnsiString __fastcall GetLookupField(void);
- bool __fastcall GetReadOnly(void);
- System::AnsiString __fastcall GetValue(void);
- System::AnsiString __fastcall GetDisplayValue(void);
- int __fastcall GetMinHeight(void);
- TDBLookupListOptions __fastcall GetOptions(void);
- bool __fastcall CanEdit(void);
- bool __fastcall Editable(void);
- void __fastcall SetValue(const System::AnsiString NewValue);
- void __fastcall SetDisplayValue(const System::AnsiString NewValue);
- void __fastcall DataChange(System::TObject* Sender);
- void __fastcall EditingChange(System::TObject* Sender);
- void __fastcall SetDataField(const System::AnsiString Value);
- void __fastcall SetDataSource(Db::TDataSource* Value);
- void __fastcall SetLookupSource(Db::TDataSource* Value);
- void __fastcall SetLookupDisplay(const System::AnsiString Value);
- void __fastcall SetLookupField(const System::AnsiString Value);
- HIDESBASE void __fastcall SetReadOnly(bool Value);
- void __fastcall SetOptions(TDBLookupListOptions Value);
- void __fastcall SetStyle(TDBLookupComboStyle Value);
- void __fastcall UpdateData(System::TObject* Sender);
- void __fastcall FieldLinkActive(System::TObject* Sender);
- void __fastcall NonEditMouseDown(Messages::TWMMouse &Message);
- void __fastcall DoSelectAll(void);
- void __fastcall SetEditRect(void);
- MESSAGE void __fastcall WMPaste(Messages::TMessage &Message);
- MESSAGE void __fastcall WMCut(Messages::TMessage &Message);
- HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
- HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- MESSAGE void __fastcall CMCancelMode(Controls::TCMCancelMode &Message);
- HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
- HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
- HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
- HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
- HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
- HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
- MESSAGE void __fastcall CMHintShow(Messages::TMessage &Message);
- HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
- HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
- HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
-
- protected:
- virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
- );
- DYNAMIC void __fastcall Change(void);
- DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
- DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
- DYNAMIC void __fastcall KeyPress(char &Key);
- virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
- virtual void __fastcall CreateWnd(void);
- void __fastcall GridClick(System::TObject* Sender);
- virtual void __fastcall Loaded(void);
-
- public:
- __fastcall virtual TDBLookupCombo(Classes::TComponent* AOwner);
- __fastcall virtual ~TDBLookupCombo(void);
- DYNAMIC void __fastcall DropDown(void);
- DYNAMIC void __fastcall CloseUp(void);
- __property System::AnsiString Value = {read=GetValue, write=SetValue};
- __property System::AnsiString DisplayValue = {read=GetDisplayValue, write=SetDisplayValue};
-
- __published:
- __property System::AnsiString DataField = {read=GetDataField, write=SetDataField};
- __property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
- __property Db::TDataSource* LookupSource = {read=GetLookupSource, write=SetLookupSource};
- __property System::AnsiString LookupDisplay = {read=GetLookupDisplay, write=SetLookupDisplay};
- __property System::AnsiString LookupField = {read=GetLookupField, write=SetLookupField};
- __property TDBLookupListOptions Options = {read=GetOptions, write=SetOptions, default=0};
- __property TDBLookupComboStyle Style = {read=FStyle, write=SetStyle, default=0};
- __property AutoSelect ;
- __property Color ;
- __property Ctl3D ;
- __property DragCursor ;
- __property DragMode ;
- __property int DropDownCount = {read=FDropDownCount, write=FDropDownCount, default=8};
- __property int DropDownWidth = {read=FDropDownWidth, write=FDropDownWidth, default=0};
- __property Enabled ;
- __property Font ;
- __property ImeMode ;
- __property ImeName ;
- __property MaxLength ;
- __property ParentColor ;
- __property ParentCtl3D ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
- __property ShowHint ;
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property OnChange ;
- __property OnClick ;
- __property OnDblClick ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property Classes::TNotifyEvent OnDropDown = {read=FOnDropDown, write=FOnDropDown};
- __property OnEndDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- __property OnStartDrag ;
- public:
- /* TWinControl.CreateParented */ __fastcall TDBLookupCombo(HWND ParentWindow) : Stdctrls::TCustomEdit(
- ParentWindow) { }
-
- };
-
- class DELPHICLASS TComboButton;
- class PASCALIMPLEMENTATION TComboButton : public Buttons::TSpeedButton
- {
- typedef Buttons::TSpeedButton inherited;
-
- protected:
- DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
- DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
- int Y);
- public:
- /* TSpeedButton.Create */ __fastcall virtual TComboButton(Classes::TComponent* AOwner) : Buttons::TSpeedButton(
- AOwner) { }
- /* TSpeedButton.Destroy */ __fastcall virtual ~TComboButton(void) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
-
- } /* namespace Dblookup */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Dblookup;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // DBLookup
-